import Vue from 'vue'
import Router from 'vue-router'
import Hello from '@/components/Hello'
// import ToParent from '@/components/toParent'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Hello',
      component: Hello
    },
    {
      path: '/toParent',
      name: 'one',
      component:  resolve => require(['@/components/toParent'], resolve)
    },
    {
      path: '/toChild',
      name: 'two',
      component:  resolve => require(['@/components/toChild'], resolve)
    },
    {
      path: '/Slot',
      name: 'three',
      component:  resolve => require(['@/components/slot'], resolve)
    },
    {
      path: '/echarts',
      name: 'foure',
      component:  resolve => require(['@/components/echarts/echarts-1'], resolve)
    }
  ]
})
